package cn.edu.njnu.opengmpback.Modeling.dao;

import cn.edu.njnu.opengmpback.Modeling.entity.ConceptModel;
import cn.edu.njnu.opengmpback.Modeling.entity.ConceptModelItems;
import cn.edu.njnu.opengmpback.Modeling.entity.LogicModel;
import cn.edu.njnu.opengmpback.Modeling.entity.LogicModelItems;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface LogicModelDao extends MongoRepository<LogicModel,String> {

    LogicModel findByProjectId(String projectId);

    Page<LogicModelItems> findAllByProjectIdAndNameLikeIgnoreCase(String projectId, String searchText, Pageable pageable);
    Page<LogicModelItems> findAllByNameLikeIgnoreCase(String searchText, Pageable pageable);
}
